package course3;

public class OrderApplication {

    public static void main(String[] args) {
        OrderDishes[] orderDishes = new OrderDishes[2];

        OrderDishes orderDishes1 = new OrderDishes();
        orderDishes[0] = orderDishes1;

        Dishes dishes = new Dishes();
        dishes.setPrice(20d);
        dishes.setName("红烧排骨");
        orderDishes1.setDishes(dishes);
        orderDishes1.setCount(2);

        orderDishes1 = new OrderDishes();
        orderDishes[1] = orderDishes1;

        dishes = new Dishes();
        dishes.setPrice(10d);
        dishes.setName("肉末茄子");
        orderDishes1.setDishes();
        orderDishes1.setCount(1);

        OrderService orderService = new OrderService();

        Order order = orderService.createOrder(orderDishes);

        System.out.println(order.getTotalAmount());

    }

}
